package com.project.bean;

import org.springframework.core.annotation.Order;

/**
 * 订单明细
 */
public class OrderInfoBean {
    private int id;
    /**购买数量*/
    private int num;
    private OrderBean order;
    private ProductBean product;

    public OrderInfoBean() {
    }

    public OrderInfoBean(int num, int orderId, int productId) {
        this.num = num;
        this.order = new OrderBean();
        this.order.setId(orderId);
        this.product = new ProductBean();
        this.product.setId(productId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public OrderBean getOrder() {
        return order;
    }

    public void setOrder(OrderBean order) {
        this.order = order;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    @Override
    public String toString() {
        return "OrderInfoBean{" +
                "id=" + id +
                ", num=" + num +
                ", order=" + order +
                ", product=" + product +
                '}';
    }
}
